package com.neu.fragement;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class AViewModel extends ViewModel {

    private MutableLiveData<String> mText;
    public AViewModel(){
        mText=new MutableLiveData<>();
        mText.setValue("初始化viewmodel");
    }

    public LiveData<String> getText(){
        return mText;
    }

    public void setText(String str){
        mText.setValue(str);
    }

}